﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Data.Entity.Migrations;
using EntityTodo315.Data.Models;

namespace EntityTodo315.Data
{
    public static class Seeder
    {
        public static void Seed(TodoDbContext db)
        {
            //    context.People.AddOrUpdate(
            //      p => p.FullName,
            //      new Person { FullName = "Andrew Peters" },
            //      new Person { FullName = "Brice Lambson" },
            //      new Person { FullName = "Rowan Miller" }
            //    );
            db.Todos.AddOrUpdate(
                t => new {t.TodoId, t.Task, t.IsCompleted },
                new Todo(){TodoId=1, Task="Learn video games", IsCompleted=false},
                new Todo(){TodoId=2, Task="take a trip on floor", IsCompleted=false},
                new Todo(){TodoId=4, Task="wash our dishes", IsCompleted=true}
                
                );
            //
        }
    }
}
